#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-02-08 11:48:12


def colorPrint(color, print_string):
    color_dict = {
        'blue': '34',
        'red': '31',
        'green': '32',
        'yellow': '33',
        'pink': '35',
        'light-blue': '36'
    }

    if color in color_dict:
        print('\033[1;%sm%s\033[0m' % (color_dict[color], print_string))
    elif color in color_dict.values():
        print('\033[1;%sm%s\033[0m' % (color, print_string))
    else:
        print('颜色不支持')


if __name__ == '__main__':
    color = '''
        'blue': '34',
        'red': '31',
        'green': '32',
        'yellow': '33',
        'pink': '35',
        'light-blue': '36'
    '''
    print('支持的颜色为：%s' % color)
    for i in range(31, 37):
        colorPrint(str(i), '打印颜色')
